<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>jquery dom操作</title>
		<script src="js/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function(){
				
				console.info("这是div中的HTML内容");
				console.info($("#d1").html());
				console.info("这是div标签中的文本内容");
				console.info($("#d1").text());
				$("#d1>p").html($("#d1>p").html()+"<input type='Text'' value='这是' />");
				console.info("这是div中的HTML内容");
				console.info($("#d1").html());
				$(":button").css("background-color","red");
			});
		</script>
	</head>
	<body>
		<div id="d1" class="cd1">
			<p id="p1" class="cp1">
				这是p标签
				<span id="si1">
					这是span标签
					<a href="#" id="a1">这是a标签</a>
				</span>
			</p>
			<input type="button" name="" id="" value="" />
		</div>
	</body>
</html>
